//-------------------------------------------------------------------
//	Copyright (c) 2010-2012  Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_DEFINES_H
#define _UX_DEFINES_H


#include "Init.h"


// Thread Object //
#ifdef ENGINE_CORE_DYNAMIC_DLL

#	define INIT_THREAD_OBJECT_EXT( _p_core, _p_thread )
#	define INIT_THREAD_OBJECT()
#	define FREE_THREAD_OBJECT()
#	undef  THREAD_LOCAL
#	define THREAD_LOCAL

#else

#	define INIT_THREAD_OBJECT_EXT( _p_core, _p_thread ) \
		TThreadObject::OnEnterThread( _p_core, _p_thread )

#	define INIT_THREAD_OBJECT() \
		TThreadObject::OnEnterThread( _pCore, this )

#	define FREE_THREAD_OBJECT() \
		TThreadObject::OnExitThread()

#endif	// ENGINE_CORE_DYNAMIC_DLL

//-------------------------------------------------------------------

#endif	// _UX_DEFINES_H